/**
 * communities
 * regions
 */

module.exports = function (app) {
    var masterData = require('../controllers/masterData-controller');

    logger.debug("load the masterData-route module....");


    //app.get('/rest/' + RESTFullServiceVersion + '/masterData/hobbies/getHobbyList', masterData.getHobbyList);

    app.get('/rest/' + RESTFullServiceVersion + '/masterData/regions/getCountryList/:deviceId', masterData.getCountryList);
    app.get('/rest/' + RESTFullServiceVersion + '/masterData/regions/getProvinceListByCountyId/:countryId/:token/:deviceId', masterData.getProvinceListByCountyId);
    app.get('/rest/' + RESTFullServiceVersion + '/masterData/regions/getCityListByProvinceId/:provinceId/:token/:deviceId', masterData.getCityListByProvinceId);
    app.get('/rest/' + RESTFullServiceVersion + '/masterData/regions/getCountyListByCityId/:cityId/:token/:deviceId', masterData.getCountyListByCityId);
    app.get('/rest/' + RESTFullServiceVersion + '/masterData/regions/getRegionById/:regionId/:token/:deviceId', masterData.getRegionById);

    app.get('/rest/' + RESTFullServiceVersion + '/masterData/regions/getRegionList/:date/:deviceId', masterData.getRegionList);
    app.get('/rest/' + RESTFullServiceVersion + '/masterData/getDataDictionary/:date/:deviceId', masterData.getDataDictionary);
    app.get('/rest/' + RESTFullServiceVersion + '/masterData/getUserPortrait/:date/:deviceId', masterData.getUserPortrait);


    //1.6.0
    app.get('/rest/' + RESTFullServiceVersion + '/masterData/userPortrait/:v/:deviceId', masterData.userPortrait);
    app.get('/rest/' + RESTFullServiceVersion + '/masterData/userHobby/:v/:deviceId', masterData.userHobby);
    app.get('/rest/' + RESTFullServiceVersion + '/masterData/regionList/:v/:deviceId', masterData.regionList);

    //1.7.0
    app.get('/rest/' + RESTFullServiceVersion + '/masterData/tags/:v/:deviceId', masterData.getTags);

    //后台管理
    app.get('/rest/' + RESTFullServiceVersion + '/masterData/regions/getDataDictionaryByCategory/:category', masterData.getDataDictionaryByCategory);

    app.get('/rest/' + RESTFullServiceVersion + '/masterData/cityList/:v/:deviceId', masterData.cityList);

};